home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / What's New? / Reference Library / Install411
Encoding:
Text File  |  1993-11-23  |  2.4 KB  |  97 lines  |  [TEXT/MPS ]

  1. #
  2. #      MPW 3.3 Install411 Script.
  3. #
  4. #    Copyright 1993, Apple Computer, Inc.
  5. #    All Rights Reserved.
  6. #
  7.  
  8. Set Exit 0
  9.  
  10. # Process input parameters.
  11.     
  12.     if "{#}" > 1
  13.         Echo "###Usage {0} [411DestinationVolume]"
  14.         Beep
  15.         Exit 1
  16.     End
  17.     
  18.     Set 411SourceDir `which "{0}"`                          # get pathname of this script
  19.     Set 411SourceDir "`files -q -f "{411SourceDir}"`"    # convert to full pathname
  20.     if "{411SourceDir}"=~/(≈:)®1≈/                        # strip the filename
  21.         Set 411SourceDir "{®1}"
  22.     End
  23.     
  24.     Set 411DestDir ""
  25.     if {#}==1
  26.         Set 411DestDir "{1}"
  27.         if "{411DestDir}"
  28.             if "`Volumes -q "{411DestDir}"`"!~/{411DestDir}/
  29.                 Echo "### 411 destination volume ∂"{411DestDir}∂" not found."
  30.                 Echo "###Usage {0} [411DestinationVolume]"
  31.                 Beep
  32.                 Exit 1
  33.             End
  34.             Set 411DestDir "{411DestDir}"411:
  35.             if not "`Exists -d "{411DestDir}"`"
  36.                 NewFolder "{411DestDir}"
  37.             End
  38.         End
  39.     End
  40.  
  41.  
  42. # Copy the 411 User Startup script into the user's MPW Shell directory.
  43.     
  44.     #disable the old UserStartup script if it exists.
  45.     if "`Exists -f "{ShellDirectory}UserStartup•~_Help_"`"
  46.         Rename "{ShellDirectory}UserStartup•~_Help_" "{ShellDirectory}UserStartup.~_Help_" ≥dev:null
  47.     End
  48.     Duplicate "{411SourceDir}Scripts:UserStartup•Help"     "{ShellDirectory}"
  49.  
  50. # Remove old help system files, if they exist.
  51.  
  52.     if "`Exists -d "{ShellDirectory}Help Folder"`"
  53.         Delete  -y "{ShellDirectory}Help Folder"
  54.     end
  55.  
  56. # Copy the entire 411 folder from the Source location to the specified destination
  57.  
  58.     if "{411DestDir}"
  59.         Duplicate "{411SourceDir}"≈     "{411DestDir}"
  60.     
  61.         # delete the old 'Help Files' folder if it exists
  62.  
  63.         if "`Exists -d "{411DestDir}Help Files:"`"
  64.             Delete  "{411DestDir}"'Help Files':CIncludesHelp≈
  65.             Delete  "{411DestDir}"'Help Files':PInterfacesHelp≈
  66.             Delete  "{411DestDir}"'Help Files':MPWHelp≈
  67.             Delete  "{411DestDir}"'Help Files':ResourcesHelp≈
  68.             Delete  "{411DestDir}"'Help Files':TechNotesHelp≈
  69.             Delete  "{411DestDir}"'Help Files':InsideMacintoshHelp≈
  70.         
  71.             if "`files "{411DestDir}Help Files:"`"==""
  72.                 Delete -y "{411DestDir}Help Files:"
  73.             End
  74.         End    
  75.  
  76.         # delete the old 'Tools and Scripts' folder if it exists
  77.  
  78.         if "`Exists -d "{411DestDir}Tools and Scripts:"`"
  79.             Delete -y "{411DestDir}Tools and Scripts:"
  80.         End
  81.     End
  82.     
  83.  
  84. # Setup the 411 directory.
  85.  
  86.     Set HelpDirectory "{ShellDirectory}Help Folder:"
  87.         
  88.     if not "`Exists "{HelpDirectory}"`"
  89.         NewFolder "{HelpDirectory}"
  90.     End
  91.     if "{411DestDir}"
  92.         Echo "{411DestDir}"
  93.     Else
  94.         Echo "{411SourceDir}"
  95.     End  >"{HelpDirectory}Help_Folder"
  96.     
  97.